<template>
  <div class="app-container">
    <el-card class="welcome-card" shadow="hover">
      <template #header>
        <div class="card-header">
          <span>欢迎使用Vue3 + Element Plus</span>
        </div>
      </template>
      <div class="card-content">
        <p>这是一个使用Vue3和Element Plus构建的示例项目</p>
        <el-button type="primary" @click="showMessage">点击我</el-button>
      </div>
    </el-card>
  </div>
</template>

<script setup>
import { ElMessage } from 'element-plus'

const showMessage = () => {
  ElMessage.success('你点击了Element Plus的按钮！')
}
</script>

<style scoped>
.app-container {
  max-width: 800px;
  margin: 100px auto;
  padding: 20px;
}

.welcome-card {
  width: 100%;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-content {
  padding: 20px 0;
}
</style>
